<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/6/21
 * Time: 10:25
 */
namespace app\exam\validate;
use think\Validate;
class Register extends Validate
{
    protected $rule =
    [
        'phone'  => 'require|max:11',
        'pwd'    => 'require|max:6'
    ];
    protected $message =
    [
        'phone.require' => '电话必须填写',
        'phone.max'     => '电话必须是11个字',

        'pwd.require'   => '密码不能为空',
        'pwd.max'       => '密码必须至少6位'
    ];
}